{% extends "misago/base.html" %}
{% load i18n misago_absoluteurl %}


{% block title %}{{ profile.username }} | {{ block.super }}{% endblock %}


{% block meta-description %}
  {% blocktrans trimmed with title=profile.get_any_title joined_on=profile.joined_on|date %}
    {{ title }}, joined on {{ joined_on }}.
  {% endblocktrans %}
{% endblock %}


{% block og-title %}{{ profile.username }}{% endblock %}
{% block twitter-title %}{{ profile.username }}{% endblock %}


{% block og-description %}
  {% blocktrans trimmed with title=profile.get_any_title joined_on=profile.joined_on|date %}
    {{ title }}, joined on {{ joined_on }}.
  {% endblocktrans %} {% blocktrans trimmed count posts=profile.posts %}
    Wrote {{ posts }} post.
  {% plural %}
    Wrote {{ posts }} posts.
  {% endblocktrans %} {% blocktrans trimmed count threads=profile.threads %}
    Started {{ threads }} thread.
  {% plural %}
    Started {{ threads }} threads.
  {% endblocktrans %}
{% endblock og-description %}


{% block twitter-description %}
  {% blocktrans trimmed with title=profile.get_any_title joined_on=profile.joined_on|date %}
    {{ title }}, joined on {{ joined_on }}.
  {% endblocktrans %} {% blocktrans trimmed count posts=profile.posts %}
    Wrote {{ posts }} post.
  {% plural %}
    Wrote {{ posts }} posts.
  {% endblocktrans %} {% blocktrans trimmed count threads=profile.threads %}
    Started {{ threads }} thread.
  {% plural %}
    Started {{ threads }} threads.
  {% endblocktrans %}
{% endblock twitter-description %}


{% block og-url %}{% absoluteurl request_path %}{% endblock %}
{% block twitter-url %}{% absoluteurl request_path %}{% endblock %}


{% block og-image %}
{% if settings.og_image_avatar_on_profile %}
  {% with profile.avatars|first as og_image %}
    <meta name="twitter:image" content="{% absoluteurl og_image.url %}" />
    <meta property="og:image" content="{% absoluteurl og_image.url %}" />
    <meta property="og:image:width" content="{{ og_image.size }}" />
    <meta property="og:image:height" content="{{ og_image.size }}" />
  {% endwith %}
{% else %}
  {{ block.super }}
{% endif %}
{% endblock og-image %}



{% block content %}
<div class="page page-user-profile">

  <div class="page-header-bg">
    <div class="page-header{% if profile.rank.css_class %} page-header-rank-{{ profile.rank.css_class }}{% endif %}">
      {% include "misago/profile/header.html" %}
      {% include "misago/profile/nav-sm.html" %}
    </div>
  </div>

  <div class="container">
    <div class="row">
      <div class="col-md-3 hidden-xs hidden-sm">
        {% include "misago/profile/nav.html" %}
      </div>
      <div class="col-xs-12 col-md-9">
        {% block section %}{% endblock section %}
      </div>
    </div>
  </div>
</div>
{% endblock content %}